package org.open.sharedRadar;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class SharedRadar extends Activity {

	public void onDestroy()
  	{  		  		
  		super.onDestroy();
  		System.runFinalizersOnExit(true);
  	    System.exit(0);		
  	}
	
	@Override
    public void onCreate(Bundle savedInstanceState) {
	    super.onCreate(savedInstanceState);	    
	    
	    setContentView(R.layout.main);	          
	
	    Button btnIesireAplicatie = (Button) findViewById(R.id.exitBtn1);		
	    btnIesireAplicatie.setOnClickListener(new OnClickListener() {	
	    	public void onClick(View v) {						
	    		try{
	    			finish();
	    			onDestroy();
	    		}
	    		catch (Exception aE)
	    		{
	    		       aE.printStackTrace ();;
	    		}	        		
	    	}
	    });               
               
      Button btnLogin = (Button) findViewById(R.id.loginBtn1);	        

      btnLogin.setOnClickListener(new OnClickListener() {        
    	  public void onClick(View v) {	
      		Intent idAdd = new Intent(SharedRadar.this,Login.class);
      		startActivity(idAdd);      	
    	  }    	
      });            
      
      Button btnSignUp = (Button) findViewById(R.id.singUpBtn1);
      btnSignUp.setOnClickListener(new OnClickListener() {        
    	  public void onClick(View v) {	
      		Intent idAddSign = new Intent(SharedRadar.this,SignUp.class);
      		startActivity(idAddSign);      	
    	  }    	
      }); 
      Bundle bundle = new Bundle();
      // add extras here..
      WebServiceSyncronizer alarm = new WebServiceSyncronizer(this, bundle, 10);
    }   
    
}